﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using CI.Models.Data;
using CI.Models.Production;
using CI.Models.Production.Interfaces;

namespace CI.UI.Prototypes
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public static IStaticDataRepository<Item> ItemRepository { get; private set; }
        public static IStaticDataRepository<Graphic> GraphicRepository { get; private set; }

        public static IStaticDataRepository<Region> MapRepository
        {
            get; private set;
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            ItemRepository = new XmlDataRepository<Item>("Production.xml");
            ItemRepository.Load();

            GraphicRepository = new XmlDataRepository<Graphic>("Graphics.xml");
            GraphicRepository.Load();

            MapRepository = new XmlDataRepository<Region>("map_complete.xml");
            //MapRepository.Load();

            base.OnStartup(e);
        }
    }
}
